home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Code Inside / Tut43.txt < prev    next >
Encoding:
Text File  |  2001-09-21  |  6.3 KB  |  146 lines

  1. *****************************************************************************************************************************************
  2.                     Win32Asm CrackMe 7
  3. *****************************************************************************************************************************************
  4.  
  5. Author:        Acid_Cool_178
  6. Protection:    Name / Serial
  7. URL:        http://members.nbci.com/_XMCM/norskehf/crackmes/asm/ac_crackme_07.zip
  8. Tools:        W32Dasm
  9.  
  10.  
  11. --->    Intro...
  12.  
  13. Welcome to my next Tutorial !!!
  14. This time we have to face a Name / Serial protection, very simple :)
  15.  
  16.  
  17. --->    Let's Begin...
  18.  
  19. Ok, open the CrackMe and you'll see 3 EditBoxes, one for your Name, one for your Serial and one
  20. for the result (Good or Bad message) :)
  21. And offcourse a Button "Check".
  22. Just fill something as your Name and Serial, i've used:
  23.  
  24. Name:        CoDe_InSiDe
  25. Serial:        1234567890
  26.  
  27. Then press the Button "Check" and you'll see in the result EditBox "Keep on trying lamer" :)
  28. Remember that line and close the CrackMe.
  29. Then disassemble the CrackMe in W32Dasm and click on "Strn Ref" (String Data References).
  30. Now double click on "Keep on trying lamer" and you'll see this:
  31.  
  32. -----------------------------------------------------------------------------------------------------------------------------------------
  33.  
  34. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  35. |:00401354(C)
  36. |
  37.  
  38. * Possible StringData Ref from Data Obj ->"Keep on trying lamer"
  39.                                   |
  40. :00401368 689F304000              push 0040309F
  41. :0040136D FF351C314000            push dword ptr [0040311C]
  42.  
  43. * Reference To: USER32.SetWindowTextA, Ord:0259h
  44.                                   |
  45. :00401373 E820010000              Call 00401498
  46.  
  47. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  48. |:00401301(C), :00401309(C), :00401366(U)
  49. |
  50. :00401378 E9AE000000              jmp 0040142B
  51.  
  52. -----------------------------------------------------------------------------------------------------------------------------------------
  53.  
  54. Ok, notice the (C)onditional jump from address 00401354, let's take a look there.
  55. And you'll see this:
  56.  
  57. -----------------------------------------------------------------------------------------------------------------------------------------
  58.  
  59. :00401343 6820314000              push 00403120            <--- Probably Fake Serial
  60. :00401348 6820334000              push 00403320            <--- Probably Real Serial
  61.  
  62. * Reference To: KERNEL32.lstrcmpA, Ord:02D6h
  63.                                   |
  64. :0040134D E870010000              Call 004014C2            <--- Compare those 2
  65. :00401352 0BC0                    or eax, eax            <--- Check if EAX is 0
  66. :00401354 7512                    jne 00401368            <--- If it is then go on and display Good Guy message, else continue
  67.  
  68. * Possible StringData Ref from Data Obj ->"You have cracked me"
  69.                                   |
  70. :00401356 688B304000              push 0040308B
  71. :0040135B FF351C314000            push dword ptr [0040311C]
  72.  
  73. * Reference To: USER32.SetWindowTextA, Ord:0259h
  74.                                   |
  75. :00401361 E832010000              Call 00401498
  76. :00401366 EB10                    jmp 00401378
  77.  
  78. -----------------------------------------------------------------------------------------------------------------------------------------
  79.  
  80. Ok, well not much to figure out in this stuff ;) except that these are the places where it Compares 2 Strings.
  81. Let's take a look a little bit more up of this stuff and you'll see this:
  82.  
  83. -----------------------------------------------------------------------------------------------------------------------------------------
  84.  
  85. :0040130B 33C0                    xor eax, eax            <--- XOR EAX which is now 00
  86. :0040130D 33D2                    xor edx, edx            <--- XOR EDX which is now 00
  87. :0040130F 6800020000              push 00000200
  88. :00401314 6820314000              push 00403120            <--- This is the place where it puts our Name
  89. :00401319 FF3514314000            push dword ptr [00403114]
  90.  
  91. * Reference To: USER32.GetWindowTextA, Ord:015Bh
  92.                                   |
  93. :0040131F E83E010000              Call 00401462            <--- Get our Name
  94. :00401324 6820314000              push 00403120            <--- Push the place to our Name
  95.  
  96. * Reference To: USER32.CharLowerA, Ord:0020h
  97.                                   |
  98. :00401329 E80A010000              Call 00401438            <--- Make all the Chars Lowercase
  99. :0040132E 6800020000              push 00000200
  100. :00401333 6820334000              push 00403320            <--- This is the place where it puts our Fake Serial
  101. :00401338 FF3518314000            push dword ptr [00403118]
  102.  
  103. * Reference To: USER32.GetWindowTextA, Ord:015Bh
  104.                                   |
  105. :0040133E E81F010000              Call 00401462            <--- Get our Fake Serial
  106.  
  107. -----------------------------------------------------------------------------------------------------------------------------------------
  108.  
  109. Hmmm, Lowercase... now you may wonder "How does that guy knows that the first GetWindowTextA gets our Name and not our Fake Serial???" ;)
  110. Well it always goes in that way, first it takes Name and then Fake Serial ;)
  111. But you can also see it in another way...
  112. Let me explain this stuff first :)
  113. Ok, first it takes our Name and puts it at Offset 00403120.
  114. and then it makes all the Chars of our Name lowercase.
  115. Then it gets our Fake Serial and puts it at Offset 00403320.
  116. After that you get the "lstrcmpA" (Compare) function to Compare the 2 "Strings" at Offset 00403120 and Offset 00403320.
  117. So the first thing that has been taken with GetWindowTextA is probably your Name :)
  118. Ok, i hope you get this, it's difficult to explain but one can just see that :) (That is if you have cracked allready some progs).
  119. And so the final result for me was:
  120.  
  121. Name:        CoDe_InSiDe
  122. Serial:        code_inside
  123.  
  124. See, very simple :)
  125. You can offcourse also check this with SoftICE (Break on GetWindowTextA as you've seen) but i'll leave that up to you ;)
  126. And I also leave the Patching up to you, because this CrackMe looks familiar Compared with the other CrackMe's :)
  127. That's All.
  128.  
  129.  
  130. --->    Greetings...
  131.  
  132. To be honest i'm getting a bit sick of these greetings everytime ;P
  133. So i'll just say:
  134.  
  135. Greetings to everyone i know, and to everyone who knows me, and You... ;P
  136.  
  137.  
  138.             Don't trust the Outside, trust the InSiDe !!!
  139.  
  140.                       Cya...
  141.  
  142.                     CoDe_InSiDe
  143.  
  144.  
  145. Email:    code.inside@home.nl
  146. Homepage: http://codeinside.cjb.net